import request from '@/utils/request'

export const getEnterprisesList = (query) => {
  return request({
    url: '/business/company/list',
    method: 'get',
    params: query
  })
}

export const getEnterprisesById = (companyId, query) => {
  return request({
    url: `/business/company/${companyId}`,
    method: 'get',
    params: query
  })
}

export const addEnterprises = (data) => {
  return request({
    url: '/business/company',
    method: 'post',
    data: data
  })
}

export const modifyEnterprises = (data) => {
  return request({
    url: '/business/company',
    method: 'put',
    data: data
  })
}

export const delEnterprises = (companyIds) => {
  return request({
    url: `/business/company/${companyIds}`,
    method: 'delete'
  })
}
